package com.hqd.jjvm.classformat.constantpool;

import com.hqd.jjvm.classformat.ClassFile;
import com.hqd.jjvm.util.HexStrTransformUtil;

public class ConstantInvokedynamicInfo extends ConstantPool {
	private Integer methodIndex;
	private Integer nameAndTypeIndex;

	public ConstantInvokedynamicInfo(ConstantInfoType tag, ClassFile classFile) {
		super(tag, classFile);
		this.methodIndex = HexStrTransformUtil.parseHexToInt(classFile.readU2());
		checkPoolIndex(methodIndex);
		this.nameAndTypeIndex = HexStrTransformUtil.parseHexToInt(classFile.readU2());
		checkPoolIndex(nameAndTypeIndex);
	}

	@Override
	public Object getVal() {
		return super.getVal();
	}
}
